import { SuiClient, getFullnodeUrl } from "@mysten/sui/client";

// Retrieve the information of objects on the chain

async function getObjects(ids: string[]) {
  const fullNodeUrl = getFullnodeUrl("mainnet");
  const client = new SuiClient({ url: fullNodeUrl });

  const objects = await client.multiGetObjects({
    ids,
    options: { showDisplay: true, showType: true, showContent: true },
  });

  return objects;
}

const objectIds = [
  "0xfff7c613d39a609ff58ff460c370feb1882eccf903dedb107b08d9cec1ac1b63",
  "0xcf994611fd4c48e277ce3ffd4d4364c914af2c3cbb05f7bf6facd371de688630",
  "0x6",
];
getObjects(objectIds).then(console.log).catch(console.error);
